import { forwardRef } from 'react';

import cs from 'classnames';

import styles from './index.module.scss';

export type TitleProps = React.DetailedHTMLProps<
  React.HTMLAttributes<HTMLDivElement>,
  HTMLDivElement
> & {};

const Title = forwardRef<HTMLDivElement, TitleProps>(({ className, children }, ref) => {
  return (
    <div className={cs(styles['title'], className)} ref={ref}>
      <div className={styles['title-text']}>
        <span>{children}</span>
      </div>
    </div>
  );
});

export default Title;
